package com.ytoglobal.overseas.address.platform.common.utils;

import org.springframework.core.io.ClassPathResource;

import java.io.File;

/**
 * @Auther: zxl
 * @Date: 2019/4/1 14:41
 * @Description:
 */
public class FileUtils {

    public static final String FILE_SEPARATOR = File.separator;

    public static String getRealFilePath(String path) {
        return path.replace("/", FILE_SEPARATOR).replace("\\", FILE_SEPARATOR);
    }

    public static String getClassPathResource(String fileName){
        ClassPathResource classPathResource = new ClassPathResource(fileName);
        System.out.println(classPathResource.getPath());
        return classPathResource.getPath();
    }
}
